﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;

namespace PayPal.Unused
{
    public partial class Checkout1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        //protected void Billing()
        //{
        //    var PaymentOption = "PayPal";

        //    if (PaymentOption == "PayPal")
        //    {
        //        NVPAPICaller test = new NVPAPICaller();

        //        string retMsg = "";
        //        string token = "";

        //        if (Session["payment_amt"] != null)
        //        {
        //            string amt = Session["payment_amt"].ToString();

        //            //Optional Shipping Address entered on the merchant site
        //            string shipToName = "<SHIPTONAME>";
        //            string shiptToStreet = "<SHIPTOSTREET>";
        //            string shiptToStreet2 = "<SHIPTOSTREET2>";
        //            string shipToCity = "<SHIPTOCITY>";
        //            string shipToState = "<SHIPTOSTATE>";
        //            string shipToZip = "<SHIPTOCITY>";
        //            string shipToCountryCode = "<SHIPTOCOUNTRYCODE>";

        //            bool ret = test.MarkExpressCheckout(amt, shipToName, shiptToStreet, shiptToStreet2,
        //                                                shipToCity, shipToState, shipToZip, shipToCountryCode,
        //                                                ref token, ref retMsg);
        //            if (ret)
        //            {
        //                Session["token"] = token;
        //                Response.Redirect(retMsg);
        //            }
        //            else
        //            {
        //                Response.Redirect("APIError.aspx?" + retMsg);
        //            }
        //        }
        //        else
        //        {
        //            Response.Redirect("APIError.aspx?ErrorCode=AmtMissing");
        //        }
        //    }
        //}
    }
}